<template>
	<div class="box">
		<van-nav-bar
		  left-text="返回"
		  left-arrow
		  @click-left="onClickLeft"
		/>
		<van-card
		  num="2"
		  :price="data.price"
		  :desc="data.title"
		  :title="data.product_name"
		  :thumb="data.url"
		/>
		<van-submit-bar :price="data.price-0"  button-text="提交订单" @submit="onSubmit" >
		
		</van-submit-bar>
	</div>
</template>

<script>
	import { Toast } from 'vant';
	import axios from 'axios'
	export default{
		name:'box',
		data(){
			return{
				data:"",
			}
		},
		created(){
			let id =this.$route.params.id
				axios({
					url:`/api/xjr/xjr/${id}`,
				 }).then(res=>{
					 this.data = res.data.data
					 console.log(this.data)
				 })
		},
		methods:{
			onSubmit(){
				console.log(1)
			},
			onClickLeft() {
			  this.$router.push('/home')
			}
		}
	}
</script>

<style>
</style>
